package org.pray.activity.strategy;

public class SpeakWay {
    private Strategy strategy; // 策略

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    // 通过策略模式调用自己的说英语方法
    public void say() {
        strategy.speak();
    }

    public static void say_with_eng() {
        System.out.println("I speak english");
    }

    public static void say_with_chn() {
        System.out.println("我说中文");
    }
}
